package com.bhs.sansong.bean;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.annotation.NonNull;

public class AddressInfo implements Parcelable {

    private int address_id;
    private String unid;
    private String truename;
    private String mobile;
    private String province;
    private String city;
    private String county;
    private String address;
    private String latitude;
    private String longitude;
    private String remark;
    private int is_default;
    private int create_time;
    private int update_time;
    private String address_type;
    private int is_temp;
    private int id;

    public AddressInfo(String city,String truename, String mobile, String address, int id) {
        this.city = city;
        this.truename = truename;
        this.mobile = mobile;
        this.address = address;
        this.id = id;
    }


    protected AddressInfo(Parcel in) {
        address_id = in.readInt();
        unid = in.readString();
        truename = in.readString();
        mobile = in.readString();
        province = in.readString();
        city = in.readString();
        county = in.readString();
        address = in.readString();
        latitude = in.readString();
        longitude = in.readString();
        remark = in.readString();
        is_default = in.readInt();
        create_time = in.readInt();
        update_time = in.readInt();
        address_type = in.readString();
        is_temp = in.readInt();
        id = in.readInt();
    }

    public static final Creator<AddressInfo> CREATOR = new Creator<AddressInfo>() {
        @Override
        public AddressInfo createFromParcel(Parcel in) {
            return new AddressInfo(in);
        }

        @Override
        public AddressInfo[] newArray(int size) {
            return new AddressInfo[size];
        }
    };

    public int getAddress_id() {
        return address_id;
    }

    public void setAddress_id(int address_id) {
        this.address_id = address_id;
    }

    public String getUnid() {
        return unid;
    }

    public void setUnid(String unid) {
        this.unid = unid;
    }

    public String getTruename() {
        return truename;
    }

    public void setTruename(String truename) {
        this.truename = truename;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getCounty() {
        return county;
    }

    public void setCounty(String county) {
        this.county = county;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public int getIs_default() {
        return is_default;
    }

    public void setIs_default(int is_default) {
        this.is_default = is_default;
    }

    public int getCreate_time() {
        return create_time;
    }

    public void setCreate_time(int create_time) {
        this.create_time = create_time;
    }

    public int getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(int update_time) {
        this.update_time = update_time;
    }

    public String getAddress_type() {
        return address_type;
    }

    public void setAddress_type(String address_type) {
        this.address_type = address_type;
    }

    public int getIs_temp() {
        return is_temp;
    }

    public void setIs_temp(int is_temp) {
        this.is_temp = is_temp;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(@NonNull Parcel parcel, int i) {
        parcel.writeInt(address_id);
        parcel.writeString(unid);
        parcel.writeString(truename);
        parcel.writeString(mobile);
        parcel.writeString(province);
        parcel.writeString(city);
        parcel.writeString(county);
        parcel.writeString(address);
        parcel.writeString(latitude);
        parcel.writeString(longitude);
        parcel.writeString(remark);
        parcel.writeInt(is_default);
        parcel.writeInt(create_time);
        parcel.writeInt(update_time);
        parcel.writeString(address_type);
        parcel.writeInt(is_temp);
        parcel.writeInt(id);
    }
}
